package com.common.core;

import com.common.core.commonBean.RequestPublicHeadParamsInfo;
import com.common.core.okHttpRequest.OkHttpRequest;
import com.common.http.basecore.utils.LogInfo;

/**
 * Created by Administrator on 2016/1/14.
 */
public class CoreConfiguration {
    private static boolean debug;

    private static RequestPublicHeadParamsInfo mHeadParamsInfo;
    //正式静态接口
    private static String SERVER_IP_4_STATIC;
    //正式服务器地址
    private static String SERVER_IP_PHP;
    //用户系统的正式域名
    private static String SERVER_IP_USER;

    private static String SERVER_IP_UPLOAD;

    public static String getServerIp4Static () {
        return SERVER_IP_4_STATIC;
    }

    public static void setServerIp4Static (String serverIp4Static) {
        SERVER_IP_4_STATIC = serverIp4Static;
    }

    public static String getServerIpPhp () {
        return SERVER_IP_PHP;
    }

    public static void setServerIpPhp (String serverIpPhp) {
        SERVER_IP_PHP = serverIpPhp;
    }

    public static String getServerIpUser () {
        return SERVER_IP_USER;
    }

    public static void setServerIpUser (String serverIpUser) {
        SERVER_IP_USER = serverIpUser;
    }

    public static String getServerIpUpload () {
        return SERVER_IP_UPLOAD;
    }

    public static void setServerIpUpload (String serverIpUpload) {
        SERVER_IP_UPLOAD = serverIpUpload;
    }

    public static RequestPublicHeadParamsInfo getHeadParamsInfo () {
        return mHeadParamsInfo;
    }

    public static void setmHeadParamsInfo (RequestPublicHeadParamsInfo mHeadParamsInfo) {
        CoreConfiguration.mHeadParamsInfo = mHeadParamsInfo;
        LogInfo.log("haitian", mHeadParamsInfo.toString());
    }

    public static void initConfig (boolean debug, RequestPublicHeadParamsInfo mHeadParamsInfo) {
        OkHttpRequest.resetHeaderMap();
        CoreConfiguration.setDebug(debug);
        CoreConfiguration.setmHeadParamsInfo(mHeadParamsInfo);
    }

    public static boolean isDebug () {
        return debug;
    }

    public static void setDebug (boolean debug) {
        CoreConfiguration.debug = debug;
        LogInfo.setIsDebug(debug);
    }

}
